home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir43
/
med300.zip
/
MEDELETE.CLA
< prev
next >
Wrap
Text File
|
1994-02-22
|
3KB
|
77 lines
!▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
!█ █
!█ MEDELETE.CLA █
!█ Text deletion █
!█ █
!█ Revision Number: 1 █
!█ Revision Date : 22-Feb-94 █
!█ █
!█ Revision History █
!█ 1 Created █
!█ █
!▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
MEMBER('MEMOEDIT')
!═════════════════════════════════════════════════════════════════════════
! Delete character at cursor
!═════════════════════════════════════════════════════════════════════════
ME_DelChar PROCEDURE
! Locals:
ubChar BYTE ! Character
CODE
ubChar = ME_GetChar(MED:usPosition) ! Get last character
ME_DelTxt(MED:usPosition, 1) ! Delete character
IF ubChar = eHRt ! If hard return deleted
ME_ReformDoc() ! Reformat document
ELSE ! Else
ME_ReformPar(MED:usPosition) ! Reformat paragrpah
. ! Endif
RETURN
!═════════════════════════════════════════════════════════════════════════
! Delete from current position to to end of line
!═════════════════════════════════════════════════════════════════════════
ME_DelEOL PROCEDURE
! Locals:
isNChars SHORT ! # of chars to delete
ubChar BYTE ! Last character
CODE
isNChars = (MED:usLineEnd - MED:usPosition) + 1! Calc # of chars to delete
ubChar = ME_GetChar(MED:usLineEnd) ! Get last character
IF ubChar = eHRt ! If hard return
isNChars -= 1 ! Adjust # chars to delete
. ! Endif
ME_DelTxt(MED:usPosition, isNChars) ! Delete to EOL
ME_ReformPar(MED:usPosition) ! Reformat paragrpah
RETURN
!═════════════════════════════════════════════════════════════════════════
! Delete entire current line
!═════════════════════════════════════════════════════════════════════════
ME_DelLine PROCEDURE
! Locals:
isNChars SHORT ! # of chars to delete
ubChar BYTE ! Last character
CODE
isNChars = (MED:usLineEnd - MED:usLineStart) + 1 ! Calc # of chars to delete
MED:usPosition = MED:usLineStart ! Move to BOL
IF MED:usPosition > 0 ! Insert hard return
ubChar = ME_GetChar(MED:usPosition-1) !
IF ubChar <> eHRt !
ME_InsTxt(MED:usPosition-1, 1, CHR(eHRt)) !
. . !
ME_DelTxt(MED:usPosition, isNChars) ! Delete text
ME_ReformDoc() ! Reformat document
RETURN